jQuery(function () {
    //选项卡的鼠标移入事件
    jQuery(".tab_controller li").mousemove(function () {
        jQuery(this).addClass("act");
        jQuery(this).siblings().removeClass("act");
    });
});
window.onload = function(){
    tab("tab_t","li","tab_c","div","onmouseover");

    function tab(tab_t,tab_t_tag,tab_cs,tag_c_tag,evt){
        var tab_t = document.getElementsByClassName(tab_t);
        for(var j=0;j<tab_t.length;j++){
            var tab_t_li = tab_t[j].getElementsByTagName(tab_t_tag);
            var tab_c = document.getElementsByClassName(tab_cs);
            var tab_c_li = tab_c[j].children;
            var len = tab_t_li.length;
            var i=0;
            for(i=0; i<len; i++){
                tab_t_li[i].index = i;
                tab_t_li[i][evt] = function(){
                    var par=this.parentNode.parentNode.parentNode.parentNode.parentNode;
                    var tab_ul = par.childNodes[1].childNodes[1].childNodes[3].childNodes[1].children;
                    var tab_div =par.children[1].children;
                    for(i=0; i<tab_ul.length; i++){
                        tab_ul[i].className = '';
                        tab_div[i].className = 'hide';
                    }
                    tab_ul[this.index].className='act';
                    tab_div[this.index].className = 'article_list';
                }
            }
        }
    }
}